package com.dsg.service.approve;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dsg.entity.apply.DsgApplyBill;
import com.dsg.entity.approve.DsgApproveCase;
import com.dsg.service.apply.IDsglService;

import java.util.List;

/**
 * <p>
 * 實例動態表 服务类
 * </p>
 *
 * @author system
 * @since 2020-07-04
 */
public interface IDsgApproveCaseService extends IService<DsgApproveCase>, IDsglService<DsgApproveCase> {

    List<DsgApproveCase> getTaskList(String userId);

    /**
     * 待審批的過一元實例
     */
    DsgApproveCase getStartedDeduOneCase(String appNo);

    /**
     * 已經審批的過一元實例
     */
    DsgApproveCase getDeduOneCase(String appNo);

    DsgApproveCase getBeginCase(DsgApplyBill bill);

    DsgApproveCase getCase(String nodeName, String appNo);

    /**
     * 超时未提交的CS申请实例
     * @return
     */
    List<DsgApproveCase> timeoutCaseList();

    /**
     * 获取未审批的case
     * @param nodeId
     * @return
     */
    DsgApproveCase getApprovedCaseByNode(String nodeId, String appNo);

    DsgApproveCase getApplyCase(String applyId);
}
